#include "common.h"
S4B Activate(PPROCESS pprocess)
{
   //Print("%X\n",pprocess);
//   Print("\nactivate %s\n",pprocess->p_name);
    pprocess->p_state=STATE_READY;
    if(process==PTR_INVALID)
    {
       process=pprocess;
       process->p_pprocessprev=pprocess;
       process->p_pprocessnext=pprocess;
       return ARTIST_ERROR_OK;
    }
    pprocess->p_pprocessprev=process->p_pprocessprev;
    process->p_pprocessprev->p_pprocessnext=pprocess;
    process->p_pprocessprev=pprocess;
    pprocess->p_pprocessnext=process;
  //  if(pprocess->p_pid==0x3E8) {Print("hehe %s ",pprocess->p_name);while(1);}

  //  Assert(0);
    return ARTIST_ERROR_OK;
}

S4B ActivateProcess(PPROCESS pprocess)
{  // Print("%X",SYSCALL_ACTIVATE);
   // if(((U4B)pprocess)==0xA00000) 
//{    //Print("\n\nhereaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");while(1);}
    S4B value;
    SystemCallInterrupt((U4B)SYSCALL_ACTIVATE,(U4B)pprocess,NULL,(U4B)&value);
    return value;
}
